<include file="public@header" />
</head>
<body>
<form class="well form-search" method="get" action="{:url('Office/noticelist')}">
	发送时间:
	<input type="text"  class="form-control js-date" name="start_time" value="{:input('request.start_time/s','')}" placeholder="请输入开始时间">--<input type="text"  class="form-control js-date" name="end_time" value="{:input('request.end_time/s','')}" placeholder="请输入结束时间">
	<input type="submit" class="btn btn-primary" value="搜索" />
	<a class="btn btn-danger" href="{:url('Office/noticelist')}">清空</a>
</form>
	<div class="wrap js-check-wrap">
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="40%">标题</th>
                    <th width="10%">发送人</th>
					<th width="20%">发送时间</th>
                    <th width="10%">读取状态</th>
					<th width="30%">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="results" item="vo">
				<tr>
                    <td >{$vo['notice_title']}</td>
					<td>{$vo['user_nickname']}</td>
					<td><php>echo date('Y-m-d H:i:s', $vo['add_time'])</php></td>
					<td>
						<if ($vo['is_read'] == 'T')><span class="label label-success">已读</span>
							<else /><span class="label btn-danger">未读</span>
						</if>
					</td>
					<td>
						<a class="js-ajax-delete" href="{:url('Office/noticelist_delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                        |
                        <a href="javascript:void(0)" onclick="noticeListLook({$vo['id']})" name="noticeid">查看</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
	<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
	<script>
		
		function noticeListLook(id){
			layer.open({
				scrollbar: false,
				shadeClose: true,
				type: 2,
				title: '查看通知',
				shade: 0.6,
				area: ['50%', '60%'],
				content: "{:url('/admin/office/noticelistlook/id/"+id+"')}",
				end: function () {
					location.reload();
				}
			})
		}

	</script>

</body>
</html>